package com.lanou.zakerproject.subscribe;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;

/**
 * Created by dllo on 16/1/11.
 * 自定义一个GridView控件
 * 功能详细描述: ScrollView嵌套GridView的解决办法
 */
public class SubscribeGridView extends GridView {
    public SubscribeGridView(Context context) {
        super(context);
    }

    public SubscribeGridView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public SubscribeGridView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }
}
